<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./node_modules/vue/dist/vue.js"></script>
</head>
<body>
    <div id="app">
        {{msg | shouzimudaxie | tianjiayuansu}}
    </div>
</body>
<script>
    //全局的过滤器
    Vue.filter("shouzimudaxie",function(value){
        return value.charAt(0).toUpperCase() + value.slice(1);
    });
    Vue.filter("tianjiayuansu",function(value){
        return value+"西瓜瓜"
    })
    let vm = new Vue({
        el:"#app",
        computed:{
            filter_msg:function(){
                return this.msg.charAt(0).toUpperCase() + this.msg.slice(1);
            },
        },
        data:{
            msg:"hello!",
        },
    });
</script>
</html>